package com.itheima.controller;/*
 * @author  xs
 * @date 2022/1/16 12:17
 * @Version  1.0
 * */

import com.itheima.manager.QuestionManager;
import org.bson.types.ObjectId;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RestController
public class QuestionController {

    @Autowired
    private QuestionManager questionManager;
    @GetMapping("/question/findBank")
public ResponseEntity  findQuestion(
    ){
        System.out.println("访问成功！！！");
    return questionManager.findByQuestion();
    }

    @GetMapping("/user/findQuestionByPage")
    public ResponseEntity  findQuestionByPage(String id){
        System.out.println(id+"<<<<<<<<<<");


        return questionManager.findQuestionById(id);

    }

//    /user/findSolution


    @GetMapping("/user/findSolution")
    public ResponseEntity  findSolution(){
        System.out.println("<<<<<<<<<<");


        return questionManager.findSolution();

    }

}
